<?php

declare (strict_types=1);
/**
 * @copyright 深圳市易果网络科技有限公司
 * @version 1.0.0
 * @link https://dayiguo.com
 */

namespace App\Request\User\Order;

use App\Request\RequestAbstract;

/**
 * class
 *
 * @author 刘兴永(aile8880@qq.com)
 * @package App\Request\User\Order
 */
class BuyRequest extends RequestAbstract
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'addr_id' => ['required', 'integer', 'min:1'],
            'sku_id' => ['required', 'integer'],
            'num' => ['required', 'integer'],
            'channel' => ['string'],
            'safe_pwd' => ['required'],
            'remark' => ['string', 'max:255'],
        ];
    }
}